home *** CD-ROM | disk | FTP | other *** search
-
-
- This set of scripts is designed to make life a little
- easier for DNS adminitrators.
-
- When you need to add delete or change hosts's information, you
- will only have to edit one file (the master name->IP addr database file
- often called named.hosts) and type 'make'. The scripts
- will generate the reverse-lookup domain files, a new copy of
- /etc/hosts, run a consistency check to make sure that /etc/hosts and
- named.hosts match, signal bind to re-read the data files, and
- rdist the new /etc/hosts file to your client workstations.
-
- Since there is a fair amount of lattitude in how you can
- set up BIND datafiles, here are the assumptions I operated under
- when writing these scripts:
-
- 1. named.hosts contains your SOA record and all the 'forward'
- IP references (name to IP addr) for all your subnets.
-
- 2. the reverse-lookup info (.inaddr.arpa) is kept in files
- one per subnet.
-
- So your BIND bootfile (named.boot) might look something like this.
- (assuming you are blrfl.com and have three class C subnets-
- 128.2.30 thru 128.2.32)
-
- primary blrfl.com named.hosts
- primary 30.2.128.in-addr.arpa named.rev.128.2.30
- primary 31.2.128.in-addr.arpa named.rev.128.2.31
- primary 32.2.128.in-addr.arpa named.rev.128.2.32
-
-
-
-
- The files in this package:
- Makefile: useful if you distribute /etc/hosts via rdist, not so
- useful if you don't.
-
- named-to-hosts: creates an /etc/hosts from named.hosts. Requires dig
- which is an incredibly useful tool that no DNS admin should be without.
- Dig is available at many FTP sites, among them:
- terminator.rs.itd.umich.edu:/unix/dns/dns-lookup-programs/dig
- valhalla.ee.rochester.edu:/pub/src/dig
-
- checkhosts: checks named.hosts against /etc/hosts, and reports
- any inconsistencies- hosts in one file but not the other, or
- hosts with incorrect IP addrs.
-
- hosts-to-rev: creates reverse-lookup files (.inaddr.arpa) files from
- the named.hosts file.
-
- findip: findip reads named.hosts and returns the next un-used IP address
- in the class C subnet you specify.
-
-
- Installation:
-
- Install the scripts in your DNS directory (often /etc/named.d or /etc).
- Or not. Edit each one, there's some constants you will have to set in
- each. The constants are at the top of each script.
-
- Find, build and install dig if you don't have it.
- Edit the Makefile to set up an rdist of the /etc/hosts file if you
- want to do things that way. If so, I recommend rdist6.x, a PD
- rdist available via ftp from usc.edu:/pub/rdist/rdist.tar.Z.
- This rdist is superior to the standard rdist, and
- the current version (6.2) has an important security fix.
-
-
- Usage:
-
- To add a new host:
- Find an unused IP addr in the correct subnet:
- ./findip <starting address>
-
- % ./findip 128.2.30.160
- 128.2.30.164
-
- In this case, 128.2.30.160 thru 128.2.30.163 were already taken, so
- findip returned 128.2.30.164.
-
-
- Edit named.hosts, add an A record (and CNAME and HINFO if desired)
- for 128.2.30.164.
-
- Make. Make will run hosts-to-rev and signal BIND to re-read
- the new data files. Then it will run named-to-hosts, and run
- checkhosts on the resulting hosts file. If it passes, it will run
- an rdist to distribute the hosts file, if you have enabled rdist
- in the Makefile.
-
-
- To change an existing hostname:
- Change the hostname in the client's /etc/hosts, and
- hostname.le0 or equivalent.
-
- Change the name in named.hosts.
-
- Make (see above).
-
-
- To delete an existing host:
- Delete it from named.hosts.
-
- Make.
-
-
-